from typing import List
from datetime import datetime

from .Staff import WorkingStaff


class Vehicle:
    def __init__(self, 
            id: int, 
            max_load: int,          # 最大业载
            vehicle_type,           # 车辆类型
            required_cre_type):     # 驾驶此车辆所需的资质
        self._id = id
        self._max_load = max_load
        self._vehicle_type = vehicle_type
        self._required_cre_type = required_cre_type

    @property
    def max_load(self):
        return self._max_load


class WorkingVehicle(Vehicle):
    def __init__(self,
            id: int, 
            max_load: int,          # 最大业载
            vehicle_type,           # 车辆类型
            required_cre_type,      # 驾驶此车辆所需的资质
            position: str,                  # 当前位置的代码 
            avail_time: datetime,           # 车辆最早可使用时间
            working_staff: WorkingStaff):   # 当前使用本车辆的员工
        Vehicle.__init__(self, id, max_load, vehicle_type, required_cre_type)
        self._position = position
        self._avail_time = avail_time
        self._working_staff = working_staff

    def __str__(self):
        return f"Equip_{self._id}(Max Load: {self._max_load})"